<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/common/taglib.jsp"%>
<div class="hs-panel">
	<div class="hs-panel-heading clearfix">
		<h4 class="pull-left"><span class="glyphicon glyphicon-list"></span> 分类</h4>
		<form id="a1" action="${admin}/mall/category" class="form-inline pull-right" role="form">
			<div class="form-group">
				<label class="sr-only" for="categoryname">类别名称</label>
				<input type="text" id="categoryname" name="categoryname" value="${param.categoryname}" class="form-control input-sm" placeholder="类别名称">
			</div>
			<button type="submit" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-search"></span> 查询</button>
		</form>
	</div>
	<div class="hs-panel-body">
		<form action="" method="post" role="form">
			<a href="${admin}/mall/category/create"><button type="button" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-plus"></span> 添加</button></a>
			<button type="submit" class="btn btn-default btn-sm hs-cf-deletes hs-multiple" formaction="${admin}/mall/category/delete"><span class="glyphicon glyphicon-trash"></span> 删除</button>
			<table>
				<thead>
					<tr>
						<th><input type="checkbox" class="hs-check-idleader" /></th>
						<th>类别名称</th>
						<th>顺序</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="category" items="${page.result}">
						<tr>
							<td><input type="checkbox" value="${category.id}" name="id" class="hs-check-id"/></td>
							<td>${category.categoryname}</td>
							<td>${category.categoryIndex}</td>
							<td>
								<a href="${admin}/mall/category/edit/${category.id}">
									<button type="button" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-edit"></span> 编辑</button>
								</a>
								<a href="${admin}/mall/category/delete?id=${category.id}" class="hs-cf-delete">
									<button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-trash"></span> 删除</button>
								</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</form>
		<hs:pager />
	</div>
</div>
